home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot / sun3src / memerr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-13  |  2.8 KB  |  68 lines

  1.  
  2. /*    @(#)memerr.h 1.1 86/09/27 SMI    */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. /*
  9.  * All Sun-3 implementations have either memory parity error detection
  10.  * or memory equipped with error correction (ECC). The memory error
  11.  * register consists of a control and an address register.  If an error
  12.  * occurs, the control register stores information relevant to the error.
  13.  * The memory address error register stores the virtual address, the
  14.  * context number, and the CPU/DVMA bit of the memory cycle at which
  15.  * the error was detected.  Errors are reported via a non-maskable
  16.  * level 7 interrupt.  In case of multiple (stacked) memory errors,
  17.  * the information relation to the first error is latched in the
  18.  * memory error register.  The interrupt is held pending and the error
  19.  * information in the memory error register is latched (frozen) until
  20.  * it is cleared (unfrozen) by a write to bits <31..24> of the memory
  21.  * error address register.
  22.  */
  23.  
  24. #define    OBIO_MEMREG 0x80000    /* address of memreg in obio space */
  25.  
  26. #ifdef LOCORE
  27. #define    MEMREG 0x0FFE4000    /* virtual address we map memreg to be at */
  28. #else
  29. struct memreg {
  30.     u_char    mr_er;        /* memory error control register */
  31. #define    mr_per    mr_er        /* parity error register */
  32. #define    mr_eer    mr_er        /* ECC error register */
  33.     u_char    mr_undef[3];
  34.     u_int    mr_dvma    : 1;
  35.     u_int    mr_cxt    : 3;
  36.     u_int    mr_vaddr:28;
  37. };
  38. #define    MEMREG ((struct memreg *)(0x0FFE4000))
  39. #endif LOCORE
  40.  
  41. /*
  42.  *  Bits for the memory error register when used as parity error register
  43.  */
  44. #define PER_INTR    0x80    /* r/o - 1 = parity interrupt pending */
  45. #define PER_INTENA    0x40    /* r/w - 1 = enable interrupt on parity error */
  46. #define PER_TEST    0x20    /* r/w - 1 = write inverse parity */
  47. #define PER_CHECK    0x10    /* r/w - 1 = enable parity checking */
  48. #define PER_ERR24    0x08    /* r/o - 1 = parity error <24..31> */
  49. #define PER_ERR16    0x04    /* r/o - 1 = parity error <16..23> */
  50. #define PER_ERR08    0x02    /* r/o - 1 = parity error <8..15> */
  51. #define PER_ERR00    0x01    /* r/o - 1 = parity error <0..7> */
  52. #define    PER_ERR        0x0F    /* r/o - mask for some parity error occuring */
  53. #define PARERR_BITS    "\20\10INTR\7INTENA\6TEST\5CHECK\4ERR24\3ERR16\2ERR08\1ERR00"
  54.  
  55. /*
  56.  *  Bits for the memory error register when used as ECC error register
  57.  */
  58. #define EER_INTR    0x80    /* r/o - ECC memory interrupt pending */
  59. #define EER_INTENA    0x40    /* r/w - enable interrupts on errors */
  60. #define EER_CE_ENA    0x10    /* r/w - enable CE recording */
  61. #define    EER_TIMEOUT    0x08    /* r/o - Sirius bus time out */
  62. #define    EER_WBACKERR    0x04    /* r/o - write back error */
  63. #define EER_UE        0x02    /* r/o - UE, uncorrectable error  */
  64. #define EER_CE        0x01    /* r/o - CE, correctable (single bit) error */
  65. #define    EER_ERR        0x0F    /* r/o - mask for some ECC error occuring */
  66. #define ECCERR_BITS    "\20\10INTR\7INTENA\5CE_ENA\4TIMEOUT\3WBACKERR\2UE\1CE"
  67. #define    ER_INTR        0x80    /* mask for ECC/parity interrupt pending */
  68.